package com.aiti.lulian.controller;

import cn.hutool.core.util.StrUtil;
import com.aiti.base.core.base.controller.WebController;
import com.aiti.base.core.utils.message.Message;
import com.aiti.lulian.service.MsgInboxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/message")
public class MsgInboxController extends WebController {
    @Autowired
    private MsgInboxService msgInboxService;

    /**
     * 消息已读
     * @param baseId
     * @return
     */
    @PutMapping("/read")
    public Message read(@RequestParam("baseId") String baseId) {
        return msgInboxService.read(baseId);
    }

    @GetMapping("/innerInfo")
    public Message innerInfo(@RequestParam("userId") String userId) {
        return msgInboxService.innerInfo(userId);
    }
}
